package com.audaque.encoding.controller;

/**
 * @author mayong
 * @since 2024/4/2
 */

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * 省略import
 */
@Tag(name = "测试接口", description = "定义测试相关接口")
@RestController
@RequestMapping("/test")
public class TestController {

    @Operation(summary = "get测试接口", description = "返回id")
    @Parameter(name = "id", description = "参数ID", example = "123456")
    @ApiResponse(responseCode = "403", description = "无权限")
    @GetMapping("/get")
    public Map<String, Object> get(@Parameter(description = "id") String id) {
        Map<String, Object> res = new HashMap<>(1);
        res.put("id", id);
        return res;
    }

}

